-- GENERATED SPELL FOR [Firewing Defender] --


function spell0_5355(pUnit, Event) --@Arcane Torrent,Self--
pUnit:FullCastSpellOnTarget(33390,pUnit)
pUnit:RegisterEvent('Sorts_5355', 2288, 1)
end

function spell1_5355(pUnit, Event) --@Mana Tap,n/a--
pUnit:FullCastSpellOnTarget(33483,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5355', 591, 1)
end

function spell2_5355(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5355', 618, 1)
end

function Sorts_5355(pUnit, Event)
local choix_sorts_5355 = math.random(0, 2)
if choix_sorts_5355 == 0 then
pUnit:RegisterEvent('spell0_5355', 1, 1)
end
if choix_sorts_5355 == 1 then
pUnit:RegisterEvent('spell1_5355', 1, 1)
end
if choix_sorts_5355 == 2 then
pUnit:RegisterEvent('spell2_5355', 1, 1)
end
end

function mob5355_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5355', math.random(1500, 3000), 1)
end

function mob5355_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5355_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5355_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5355, 1, 'mob5355_Action')
RegisterUnitEvent(5355, 2, 'mob5355_Leave')
RegisterUnitEvent(5355, 3, 'mob5355_Kill')
RegisterUnitEvent(5355, 4, 'mob5355_Die')
